//
//  ALLogManager.h
//  ios-loan-assistant
//
//  Created by hcs on 2018/9/7.
//  Copyright © 2018年 guoqingping. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef NS_OPTIONS(NSUInteger, LogFlag) {
    LogFlagError = (1 << 0), // 0...00001
    LogFlagWarning = (1 << 1), // 0...00010
    LogFlagInfo = (1 << 2), // 0...00100
    LogFlagDebug = (1 << 3), // 0...01000
    LogFlagVerbose = (1 << 4)  // 0...10000
};

typedef NS_ENUM(NSUInteger, LogLevel) {
    LogLevelOff = 0,
    LogLevelError = (LogFlagError),                       // 0...00001
    LogLevelWarning = (LogLevelError | LogFlagWarning), // 0...00011
    LogLevelInfo = (LogLevelWarning | LogFlagInfo),    // 0...00111
    LogLevelDebug = (LogLevelInfo | LogFlagDebug),   // 0...01111
    LogLevelVerbose = (LogLevelDebug | LogFlagVerbose), // 0...11111
    LogLevelAll = NSUIntegerMax                           // 1111....11111 (LogLevelVerbose plus any other flags)
};
@interface ALLogManager : NSObject
+ (void)logFlag:(LogFlag)flag
           file:(const char *)file
         format:(NSString *)format, ... ;

+ (void)setLogLevel:(LogLevel)level;

@end
